<html>
	<head>
		<title>tallyFailedAudit.html</title>
		<meta http-equiv="content-type" content="text/html; charset=utf-8">
		<link href="../../css/general1.css" rel="stylesheet" type="text/css" />

		<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
		<link href="style/css.css" rel="stylesheet" type="text/css" />
		<link href="../../zephyr/css/drift.css" rel="stylesheet"
			type="text/css" />
		<script type="text/javascript" src="../../script/hiawardbpm.js"></script>
		<script type="text/javascript" src="../../script/prototype.js"></script>
		<script type="text/javascript" src="/vchzms-hiaward/dwr/engine.js"> </script>
		<script type="text/javascript" src="/vchzms-hiaward/dwr/util.js"> </script>
		<script type="text/javascript"
			src="/vchzms-hiaward/dwr/interface/OutService.js"></script>
		<script type="text/javascript"
			src="/vchzms-hiaward/dwr/interface/Dao.js"></script>
		<script type="text/javascript">
		
        function subForm(msg){
          var webData=buildWebData(msg);
          var xmlMsg=window.dialogArguments;
          alert(xmlMsg.getXmlDocument().xml);
          xmlMsg.setCommand(12);
          xmlMsg.setWebData(webData);
          xmlMsg.buildXML();
          var url="/vchzms-hiaward/ProcessAjaxHandler";
          alert(xmlMsg.getXmlDocument().xml);
          new Ajax.Request(url,{
          method:'post',
          postBody:xmlMsg.getXmlDocument().xml,
          contentType:'application/x-www-form-urlencoded',
          encoding:'UTF-8',
          onComplete:function(transport){
	          try{
		          if(200==transport.status){
		               alert('成功创建了一个新任务');
		               window.close();
		              }
		          if(400==transport.status){
		               alert('创建失败');
		              }
	          }catch(err){
	              alert('js异常');
	          }
          }
       });
         }
         function buildWebData(msg){
         var xmlMsg=window.dialogArguments;
	     var vchsid=xmlMsg.getWebData().getProperty('vchsid');
          var webData=new WebData();
          if(msg=="1"){
            var editselect=document.getElementById("editselect").value;
            alert(editselect);
            webData.setProperty('rtreason',editselect);
          }
          if(msg=="2"){
            var rereason=$('reRes').value;
            webData.setProperty('rereason',rereason);
          }
          webData.setProperty('restally',msg);
          webData.setProperty('vchsidInput',vchsid);
          return webData;
         }
         function getCustInfo(){
         var accno=$('accno').value;
            OutService.Z_BAPI_ACCOUNT_INFO(accno,function(data){
              var custid=data.custId;
              $('coName').innerHTML=data.accName;
              OutService.Z_BAPI_BP_GET_ORG_DETAIL(custid,function(data){
                $('connector').innerHTML=data.connector;
                $('tel').innerHTML=data.tel;
              });
           });
         }
         function getVoucherInfo(){
         var xmlMsg=window.dialogArguments;
	     var vchsid=xmlMsg.getWebData().getProperty('vchsid');
         Dao.getVoucherById(vchsid,function(data){
          $('accno').value=data.accno;
          $('vchno').value=data.vchno;
          $('amount').value=data.amount;
          $('vchtype').value=data.vchtype;
          $('vchpwd').value=data.vchpwd;
          $('vchdate').value=data.vchdate;
          getCustInfo();
            });
         }
         //显示退票理由的遮蔽层
         function retRes(){
          changeReres();
          document.getElementById('rlight').style.display='block';
		  document.getElementById('fade').style.display='block';
         
         }
         //编辑修改退票理由的方法
         function changeReres(){
           var retArrs=$('rtRes').options;
           alert(retArrs.length);
           for(var i=0;i<retArrs.length;i++){
             if(retArrs[i].selected==true){
              $('editselect').value=retArrs[i].value;
              }
           }
         }
         
          //显示返回经办理由的遮蔽层
         function reRes(){
          document.getElementById('relight').style.display='block';
		  document.getElementById('fade').style.display='block';
         
         }
    </script>
	</head>

	<body>
		<center>
			<table width="900" border="1" cellspacing="0" cellpadding="0">
				<tr>
					<td width="65%" height="80">
						<table width="100%" border="1" cellspacing="0" cellpadding="0">
							<tr>
								<td>
									<img src="pic/00000001.jpg" width="601" height="283" />
								</td>
							</tr>
							<tr>
								<td>
									<img src="pic/00000002.jpg" width="601" height="283" />
								</td>
							</tr>
						</table>
					</td>
					<td width="35%" height="" valign="top">
						<span style="width: 28%" class="title1"> <a name="tag"
							class="selectli1">客户信息</a> </span>
						<table width="100%" border="0" cellpadding="0" cellspacing="0"
							class="tablist1">

							<tr>
								<td width="24%">
									公司名称:
								</td>
								<td>
									<span id="coName">北京紫枫科技开发公司</span>
								</td>
							</tr>
							<tr>
								<td>
									联系人:
								</td>
								<td>
									<span id="connector">韩敏</span>
								</td>
							</tr>
							<tr>
								<td>
									联系电话:
								</td>
								<td>
									<span id="tel">13466347403</span>
								</td>
							</tr>
							<tr>
								<td>
									备注:
								</td>
								<td>
									<span id="remark"></span>
								</td>
							</tr>
						</table>
						<span style="width: 28%" class="title1"> <a name="tag"
							class="selectli1">票据信息</a> </span>
						<table width="100%" border="0" cellpadding="0" cellspacing="0"
							class="tablist1">
							<tr>
								<td width="24%">
									账号:
								</td>
								<td width="76%">
									<span id="accno">12312</span>
								</td>
							</tr>
							<tr>
								<td>
									凭证号:
								</td>
								<td>
									<span id="accno">1231</span>
								</td>
							</tr>
							<tr>
								<td>
									凭证类型:
								</td>
								<td>
									<span id="accno">00</span>
								</td>
							</tr>
							<tr>
								<td>
									批次号:
								</td>
								<td>
									<input id="batno" />
								</td>
							</tr>
							<tr>
								<td>
									凭证日期:
								</td>
								<td>
									<span id="accno">2009-01-09</span>
								</td>
							</tr>
							<tr>
								<td>
									凭证金额:
								</td>
								<td>
									<span id="accno">123,2323</span>
								</td>
							</tr>
							<tr>
								<td>
									支付密码:
								</td>
								<td>
									<span id="accno">1312-123-23</span>
								</td>
							</tr>
							<tr>
								<td>
									密码结果:
								</td>
								<td>
									<span>通过</span>
								</td>
							</tr>
							<tr>
								<td colspan="2">
									记账失败原因:
								</td>

							</tr>
							<tr>
								<td colspan="2">
									<textarea name="abstally" id="abstally" cols="43" rows="2"
										class="font4red">就是失败了，没有原因！！</textarea>
								</td>
							</tr>
						</table>
					</td>

				</tr>

			</table>
			<table width="40%" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td align="center" valign="bottom">
						<form id="form2" name="form2" method="post" action="">
							<label>
								<input type="button" name="Submit" value="记账" class="btn1"
									onclick="subForm('0')" />
							</label>
							<label>
								<input type="button" name="Submit" value="退票" class="btn1"
									onclick="retRes()" />
							</label>
							<label>
								<input type="button" name="Submit" value="返回经办" class="btn1"
									onclick="reRes()" />
							</label>
							<label>
								<input type="button" name="Submit2" value="下一条" class="btn1" />
							</label>
							<input type="submit" name="Submit3" value="关闭"
								onClick="self.close()" class="btn1" />
						</form>
					</td>
				</tr>
			</table>

		</center>
		<div id="rlight" class="white_content_audit">
			<table align="center" width="600px" height="150px" border="0"
				class="tablist1">
				<tr>
					<td width="300px">
						<select id="rtRes">
							<option value="qq">
								大小写不一致
							</option>
							<option value="qq">
								大写正有误
							</option>
							<option value="qq">
								小写无封口
							</option>
							<option value="qq">
								收背不符
							</option>
							<option value="qq">
								背书不连续
							</option>
							<option value="qq">
								背书不全
							</option>
							<option value="qq">
								票面涂改
							</option>
							<option value="qq">
								票面污损
							</option>
							<option value="qq">
								票面要素不全
							</option>
							<option value="qq">
								远期
							</option>
						</select>
						<button class='btn1' onclick="changeReres()">
							编辑所选项
						</button>
					</td>
					<td width="300px">
						<textarea rows="2" cols="30" id="editselect"></textarea>
					</td>
				</tr>
			</table>

			<p align="center">
				<a href="javascript:void(0)" onclick="subForm('1')"> 确定 </a>
			</p>
		</div>
        
        <div id="relight" class="white_content_audit">
			<table align="center" width="600px" height="150px" border="0"
				class="tablist1">
				<tr>
					<td width="300px">
						<textarea id="reRes" rows="5" cols="30"></textarea>
					</td>
				</tr>
			</table>

			<p align="center">
				<a href="javascript:void(0)" onclick="subForm('2')"> 确定 </a>
			</p>
		</div>
		<div id="fade" class="black_overlay"></div>
	</body>
	<script type="text/javascript">
	 //getVoucherInfo();
	</script>
	<script type="text/javascript">
		  function openwin() {
		//var ticket_frame = document.getElementById("ticket_cont").documentElement;
		//var img = el.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src;
		//addCookie("img_src",img,-1);
		//document.ticket.src=img;
		//alert($("content_frame").$("ticket").innerHTML);
		document.getElementById('rlight').style.display='none';
		document.getElementById('light').style.display='block';
		document.getElementById('fade').style.display='block';
		//ticket_frame.contentWindow.document.getElementById('ticket').src = img;
		//alert(ticket_frame);
		//setTimeout(function(){ticket_frame.contentWindow.document.getElementById('ticket').src = img;},3000);
		//document.getElementById('ticket_cont').contentWindow.document.getElementById('ticket').src = img;
		
	     }
		</script>
</html>
